import request from '@/config/axios'

// 分页
export const getPage = async (params: any) => {
  return await request.get({ url: `/dine/print/config/page`, params })
}

// 详情
export const getDetailById = async (id: number | string) => {
  return await request.get({ url: `/dine/print/config/get/` + id })
}

// 读取
export const read = async () => {
  return await request.get({ url: `/dine/print/config/read` })
}

// 写入
export const write = async (data: any) => {
  return await request.post({
    url: `/dine/print/config/write`,
    data,
    showSuccessMessage: true
  })
}
